<template>
  <view class="p-h24 p-b24 bot-share">
    <view class="p-v40 flex-c">
      <tex class="text-700-132">分享</tex>
    </view>
    <view class="p-v40 flex">
      <view class="flex-1 flex-d-c" @click='handleShare("WXSceneSession")'>
        <image class="m-b18 icon" src="@/static/images/office/wx.png" mode="aspectFit" />
        <text class="text-400-128">微信好友</text>
      </view>
      <view class="flex-1 flex-d-c" @click='handleShare("WXSceneTimeline")'>
        <image class="m-b18 icon" src="@/static/images/office/moments.png" mode="aspectFit" />
        <text class="text-400-128">微信朋友圈</text>
      </view>
      <!-- <view class="flex-1 flex-d-c">
        <image class="m-b18 icon" src="@/static/images/office/qq.png" mode="aspectFit" />
        <text class="text-400-128">QQ好友</text>
      </view> -->
    </view>
    <view class="p-v24 flex-c" @click="emit('cancel')">
      <text class="text-400-328">取消</text>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { defineEmits } from 'vue'
function handleShare(scene) {
  uni.showShareMenu({
    withShareTicket: true,
    menus: ['shareAppMessage', 'shareTimeline']
  })
}

const emit = defineEmits<{
  (e: 'cancel'): void
}>()
</script>

<style lang="scss" scoped>
.icon {
  width: 80rpx;
  height: 80rpx;
}
</style>
